<% 
    suser = session_user
    link_title = suser ? "Sign out" : "Sign in or Sign up"
    action = suser ? {:controller => "login", :action => :logout} : {:controller => "login"}
    html_options = suser ? {:confirm => "Really sign out user " + suser.login + "?"} : {}
%>
<div class="top_menu" >
        <div class="menu_elements">
        <div class="fieldtrip_logo" ><%= link_to image_tag("fieldtrip_logo.jpg"), {:controller => "countries" , :action => "list" } %></div>
        <div class="menu" >
            <div class="logged_user_menu" >
                <% if suser %>
                <p>Signed in as <%= link_to(suser.login, {:controller => "preferences"}) %></p> 
                <% end %>
            </div>
            <ul>
                <li><%=link_to "Choose a Case Study", :controller =>'home',:action=> 'index' %></li>
                <li>|</li><li><%=link_to "Help", :controller =>'help',:action=> 'index' %></li> 
                <li>|</li><li><%= link_to(link_title, action, html_options) %></li>
            </ul>
        </div>
        <div class="clear_float_right" ></div>
        <div class="clear_float_left" ></div>
        </div>
</div>